home *** CD-ROM | disk | FTP | other *** search
- /*
- Interactive ARexx expression processor
- $VER: IRShell.rexx (30 Apr 1997)
-
- Author: dhomas trenn (dhomas@youngmonkey.ca)
- */
-
-
- signal on error
- signal on failure
- signal on syntax
-
- if ~divert("CON:0/288/640/112/IRShell v97.04.30/CLOSE/SCREEN MSE") then exit
- say "cxy"
-
- rc = 0
- options prompt "> "
-
-
- options results
-
-
- Input:
- do forever
- parse pull line
- if eof(stdin) then exit
- if line = "=" then
- interpret 'say "RESULT = "RESULT'
- else if left(line,1) = "=" then
- interpret say substr(line, 2)
- else
- interpret line
- end
-
-
- divert: procedure
-
- call close(stdout)
- call close(stdin )
- success = 0
- if open(stdout,arg(1),"w") then do
- call pragma("*",stdout)
- if open(stdin,"*","r") then
- success = 1
- else
- call close(stdout)
- end
- if ~success then do
- call pragma("*")
- call open(stdout,"*","w")
- call open(stdin, "*","r")
- end
- return success
-
-
- error:
- failure:
- syntax:
- say " Error: RC= "rc; signal Input
-